<%-- 
    Document   : crear_cheques
    Created on : 24-sep-2011, 9:50:50
    Author     : Yojugracu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id = "conectar" scope = "application" class= "Monetario.ManipulacionMysql"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<div id="paso1_crear_cheque" class="paso1_cuenta">
    <%
    String paso=request.getParameter("paso");
    if(paso==null){paso="1";}
if(paso.equals("1")){
%>
		<!--  start step-holder -->
		<div id="step-holder">
			<div class="step-no">1</div>
			<div class="step-dark-left"><a href="">Paso 1</a></div>
			<div class="step-dark-right">&nbsp;</div>
			<div class="step-no-off">2</div>
			<div class="step-light-left">Paso 2</div>
			<div class="step-light-right">&nbsp;</div>
			<div class="clear"></div>
		</div>
		<!--  end step-holder -->

		<!-- start id-form -->
		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
			<th valign="top">No. Cuenta:</th>
			<td>
                            <input  id="input-cuenta" type="text" class="inp-form" />
                        </td>
			<td>
                            <div id="div-cuenta-left" class="error-left" style="display:none"></div>
                            <div id="div-cuenta-inner" class="error-inner" style="display:none">Este campo es requerido</div>
			</td>
		</tr>
                <tr>
                    <th valign="top">No. Cheques:</th>
                    <td>
                    <select id="numero_cheques" class="styledselect_form_1">
                            <option value="25">25</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                    </select>
                    </td>
                    <td></td>
                </tr>
		<tr>
                   <br>
		<th valign="top">Fecha :</th>
		<td class="noheight">
                    <br>
			<table border="0" cellpadding="0" cellspacing="0">
			<tr  valign="top">
                            <form id="chooseDateForm" action="#" method="">
				<td>


				<select id="d" class="styledselect-day">
					<option value="dd">dd</option>
                                        <%
                                            int dia=1;
                                            for(int i=0;i<31;i++){
                                                  out.println("<option value=\""+Integer.toString(dia)+"\">"+Integer.toString(dia)+"</option>");
                                                  dia++;
                                                  }
                                        %>

				</select>
				</td>
				<td>
					<select id="m" class="styledselect-month">
						<option value="m">mmm</option>
						<option value="1">Jan</option>
						<option value="2">Feb</option>
						<option value="3">Mar</option>
						<option value="4">Abr</option>
						<option value="5">May</option>
						<option value="6">Jun</option>
						<option value="7">Jul</option>
						<option value="8">Ago</option>
						<option value="9">Sep</option>
						<option value="10">Oct</option>
						<option value="11">Nov</option>
						<option value="12">Dec</option>
					</select>
				</td>
				<td>
					<select  id="y"  class="styledselect-year">
						<option value="yyyy">yyyy</option>
                                                <%
                                                int anio=1990;
                                                for(int i=0;i<=21;i++){
                                                      out.println("<option value=\""+Integer.toString(anio)+"\">"+Integer.toString(anio)+"</option>");
                                                      anio++;
                                                }
                                                %>

					</select>

				</td>
                                <td>
                                    <div id="div-fecha-left" class="error-left" style="display:none"></div>
                                    <div id="div-fecha-inner" class="error-inner" style="display:none">Fecha invalidad</div>
                                </td>
                        </form>
			</tr>
			</table>

		</td>
		<td><br></td>
	</tr>
	<tr>
		<th>&nbsp;</th>
	<!--	<td valign="top">
                    <br>
                    <input type="button" value="" class="form-submit" onclick="crear_cuenta_paso2();" />
			<input type="button" value="cancelar" class="form-reset" onclick="retornar_pagina_inicio();" />
		</td>
		<td><br></td>
 !-->
	</tr>
	</table>
	<!-- end id-form  -->
        		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
        <tr>
		<th>&nbsp;</th>
		<td valign="top">
			<input type="button" value="" class="form-submit" onclick="crear_cheques_paso2();" />
			<input type="button" value="regresar" class="form-reset" Onclick="retornar_pagina_inicio();" />
		</td>
		<td></td>
	</tr>
	</table>
<%
}
else{
    String cuenta=request.getParameter("cuenta");
    String cheques=request.getParameter("cheques");
    if(cuenta!=null && cheques!=null){
        conectar.crear_chequera("'"+cuenta+"','"+cheques+"',@a");
    %>
    		<div id="step-holder">
			<div class="step-no-off">1</div>
			<div class="step-light-left"><a href="">Paso 1</a></div>
			<div class="step-light-right">&nbsp;</div>
			<div class="step-no">2</div>
			<div class="step-dark-left">Paso 2</div>
			<div class="step-dark-right">&nbsp;</div>
			<div class="clear"></div>
		</div>
    <h2>Su chequera de &nbsp;<% out.println(cheques+" cheques ha sido solicitada a la cuenta numero "+cuenta);%>&nbsp;  de forma exitosa.</h2>
    <%
}
}
%>

</div>
